# 现有一个字符串“hello你好.1,23wfsafeasd"
# 打印出字符串中每个字符出现次数
''''
char=input("输入一个字符串")
dic={}
for str in char :
    if str not in dic:
        dic[str]=1
    else:
        dic[str]+=1
for key in dic:
    print(key,':',dic[key],'次')
b=max(dic.values())
for k,v in dic.items():
    if v==b:
        print(k,b)
'''
'''
s = "asdwdfasxc"
#用来记录字符出现次数的字典，字符为key，次数为value
d={}
#取出每一个字符
for i in s:
    #去字典中取出对用字符出现次数，如果没有则设置为0
    temp = d.get(i,0)
    #给相应字符出现次数+1
    d[i] = temp+1
print(d)
'''
Str="asdeffdd"
dic={}
for i in Str:
    if i in dic:
        dic[i]+=1
    if i not in dic:
        dic[i]=1
b=max(dic.values())
for k,v in dic.items():
    if v==b:
        print(k,b)
print(dic)

